package com.yunhe.policyfulfillment.authority.repository;

import com.yunhe.policyfulfillment.authority.domain.PolicyOrg;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName IPolicyOrg
 * @Description TODO
 * @Author HeTao
 * @Date 2021/7/26 9:30
 * @Version 1.0
 **/
@Repository
public interface IPolicyOrgRepository {

    /**
     * 新增
     * @author hetao
     * @date 2021/07/26
     **/
    int createPolicyOrg(PolicyOrg PolicyOrg);

    /**
     * 新增
     * @author hetao
     * @date 2021/07/26
     **/
    int createPolicyOrgSelective(PolicyOrg PolicyOrg);

    /**
     * 刪除
     * @author hetao
     * @date 2021/07/26
     **/
    int deletePolicyOrgByPrimaryKey(@Param("id") int id);

    /**
     * 更新
     * @author hetao
     * @date 2021/07/26
     **/
    int updatePolicyOrgByPrimaryKey(PolicyOrg PolicyOrg);

    /**
     * 更新
     * @author hetao
     * @date 2021/07/26
     **/
    int updatePolicyOrgByPrimaryKeySelective(PolicyOrg PolicyOrg);

    /**
     * 根据主键查询
     * @author hetao
     * @date 2021/07/26
     **/
    PolicyOrg searchPolicyOrgByPrimaryKey(@Param("id") int id);

    List<PolicyOrg> findPolicyOrgs();

    List<PolicyOrg> findPolicyOrgsByOrgType(@Param("orgType") String orgType);

    List<PolicyOrg> findPartyGovernmentOfficeAndCompetentAuthority();
}
